package control.panel
{
	import global.GameState;
	import global.Message;
	
	import utils.DisplayTool;
	
	import view.panel.FamusRemark;

	public class FamusRemarkControl extends PanelControl
	{
		private var famusRemark:FamusRemark;
	
		
		public function FamusRemarkControl()
		{
			initFamusRemark();
			step();
		}
		
		private function initFamusRemark():void
		{
			famusRemark = new FamusRemark(this);
			famusRemark.x = 262;
			famusRemark.y = 6;
			_view.playPanel.addChild(famusRemark);
			
			
			var xml:XML;
			var contents:Array = [];
			for each (xml in Message.famusXML.item)
			{
				contents.push(xml.toString());
			}
			famusRemark.updateContent(contents);
		}
		
		public function step():void
		{
			famusRemark.next();
		}
		
		public function hide():void
		{
			DisplayTool.removeChild(_view.playPanel,famusRemark);
		}
		
		public function add():void
		{
			_control.famousPanelControl.open();
		}
		
		public function show():void
		{
			_view.playPanel.addChild(famusRemark);
		}
		
		
	}
}